fix: stacked bar chart minBarLength causes overlapping - #10766
Conversation
|
Hi, I'm having an issue with floating, stacked bars (#10774). I was wondering if you could point me in the right direction in terms of what I can do to get a fix for this. I have zero familiarity with the code base, so digging around blindly isn't doing anything for me. It seems you have worked in this area, and any help you can provide would be greatly appreciated! |
kurkle
left a comment
There was a problem hiding this comment.
While this seems to be a working and quite clean solution, I don't really like it.
Other datasets also now read the _visualValues, which are just a copy of what was previously read. Are the other values used for something (in bar controller) now?
|
@kurkle Yes, I also agree that there should be a more technically correct way of doing this. Unfortunately, I am not familiar with the codebase enough to figure that out. Regarding what is Finally, which |
kurkle
left a comment
There was a problem hiding this comment.
me not liking this should not be a blocker. also its all internals, so it can be adjusted in upcoming releases if need be.
|
I guess we can try this. The implementation does give me pause for the reasons @kurkle mentioned. We can always adjust or remove later if it's a problem |
This PR introduces a new private field
_visualValuesinmeta.parsed._stacks[axis], which stores the data coordinates of the bar rendered after applyingminBarLength, and is then used inapplyStack()instead of the actual value.Added two fixture unit tests for the expected behavior of both vertical and horizontal stacked bar chart, using linear axis.
Please note that this PR did not handle logarithmic axis properly. Would appreciate if anyone can help on that.
Thank you @etimberg and @kurkle for all the help on Slack! Feedback is welcome!
Closes #10664.